using System.IO;

namespace CS2.Core
{
    public static class IdIdentifierUtilities
    {
        public static GetPathFromIdentifier(identifier : string) : string
        {
            def url = identifier.Replace('\u0000', Path.DirectorySeparatorChar);
            url.Substring(0, url.LastIndexOf(Path.DirectorySeparatorChar));
        }

        public static GetIdentifierFromFile(file : FileInfo) : string
        {
            unless(file.Exists)
                throw FileNotFoundException("File not found", file.FullName);

            file.FullName.Replace(Path.DirectorySeparatorChar, '\u0000') + "\u0000" + file.LastWriteTime.Ticks;
        }
    }
}